meson: testsuites: tools: add meson build
authorTim-Philipp Müller <tim@centricular.com>
Wed, 22 Mar 2017 13:39:14 +0000 (13:39 +0000)
committerEmmanuele Bassi <ebassi@gnome.org>
Wed, 3 May 2017 14:10:55 +0000 (15:10 +0100)
gtk/meson.build
testsuite/meson.build
testsuite/tools/meson.build [new file with mode: 0644]

index 2adbe2c6eaff43e018f659bd30182b834abe3f91..6bdf79912c1c745fba39d224cc288a62e57912f0 100644 (file)
@@ -857,11 +857,13 @@ foreach tool : gtk_tools
   tool_name = tool.get(0)
   tool_srcs = tool.get(1)
 
-  executable(tool_name, tool_srcs,
+  exe = executable(tool_name, tool_srcs,
     include_directories: [confinc],
     c_args: gtk_cargs,
     dependencies: libgtk_dep,
     install: true)
+
+  set_variable(tool_name.underscorify(), exe) # used in testsuites
 endforeach
 
 # Data to install
index 59a07774e91fa1bb69b5b48d3737c13671a68bd8..fef8506bbdfa6949920947323081f3a8ca6d4fb1 100644 (file)
@@ -2,5 +2,5 @@ subdir('gtk')
 subdir('gdk')
 subdir('css')
 subdir('a11y')
-# subdir('tools') # FIXME
+subdir('tools')
 # subdir('reftests') # FIXME: needs more work
diff --git a/testsuite/tools/meson.build b/testsuite/tools/meson.build
new file mode 100644 (file)
index 0000000..d705601
--- /dev/null
@@ -0,0 +1,31 @@
+bash = find_program('bash', required : false)
+if bash.found()
+  test_env = environment()
+  test_env.set('GTK_BUILDER_TOOL', get_variable('gtk4_builder_tool').full_path())
+  test_env.set('GTK_QUERY_SETTINGS', get_variable('gtk4_query_settings').full_path())
+
+  foreach t : ['simplify', 'settings']
+    configure_file(output : 'test-@0@'.format(t),
+      input : 'test-@0@.in'.format(t),
+      configuration : configuration_data())
+
+    test('test-@0@'.format(t), bash,
+      args : 'test-@0@'.format(t),
+      workdir : meson.current_build_dir(),
+      env : test_env)
+  endforeach
+endif # bash found
+
+# Installed data
+
+test_simplify_data = [
+  'simplify/test1.ui', 'simplify/test1.expected',
+  'simplify/test2.ui', 'simplify/test2.expected',
+  'simplify/test3.ui', 'simplify/test3.expected',
+  'simplify/test4.ui', 'simplify/test4.expected',
+  'simplify/test5.ui', 'simplify/test5.expected',
+  'simplify/test6.ui', 'simplify/test6.expected',
+  'simplify/test7.ui', 'simplify/test7.expected',
+  'simplify/test8.ui', 'simplify/test8.expected',
+]
+# TODO: install in case of installed tests - install_data()